/**
 * Sample React Native App
 * https://github.com/facebook/react-native
 *
 * @format
 * @flow
 */

import React, { PureComponent } from 'react';
import {
  SafeAreaView,
  StyleSheet,
  ScrollView,
  View,
  Text,
  StatusBar,
} from 'react-native';
import SplashScreen from 'react-native-splash-screen';
import AppNavigator from './app/src/pages/AppNavigator';
import LoadingSpinner from './app/src/components/LoadingSpinner';

class App extends PureComponent {
  constructor(props) {
    super(props);
  }
  componentDidMount() {
    setTimeout(SplashScreen.hide,2000);
  }
  render() {
    return (
      <View style={styles.container}>
        <AppNavigator style={styles.container} />
        {<LoadingSpinner
          ref={(r) => {
            global.mLoadingComponentRef = r;
          }}
        />}
      </View>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#fff',
  },
});

export default App;
